package test.a;

import pool.Task;
import pool.ThreadPool;
import billing.system.http.HttpUtils;
import billing.system.logger.SysLog;

public class B extends Task {
	String url = null;

	public B(String url) {
		this.url = url;
	}

	@Override
	public void run() {
		callback(HttpUtils.get(url));
	}

	void callback(String html) {
	}

	public static void main(String[] args) {
		SysLog.initialize();
		SysLog.in("F:/aaa.txt", new SysLog() {
			protected String callBack(String line) {
				final String aa[] = line.split("###");
				final String page = "page" + aa[0] + ".html";
				ThreadPool.getInstance().addTask(new B(aa[1]) {
					void callback(String html) {
						SysLog.o(page, html, true);
					}
				});
				return null;
			}
		});
	}

}
